import * as actionTypes from './constants'

const defaultState = {
    citieslist: [],
    eventslist: [],
}
export default (state = defaultState, action) => {
    switch(action.type) {
        case actionTypes.CHANGECITIES_LIST: 
            return {
                ...state,
                citieslist: action.data
            }
        case actionTypes.CHANGE_EVENTS_LIST: 
            // console.log('----------')
            return {
                ...state,
                eventslist: action.data,
            }  
            
        default:
            return state
    }
}